package com.aaa.security;

import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @ClassName: PasswordEncoderConfig
 * @Description: TODO
 * @Author: 86139
 * @Date: 2021/7/28 19:00
 * @Version:1.0
 **/
public class PasswordEncoderConfig implements PasswordEncoder {
    @Override
    public String encode(CharSequence charSequence) {
        System.out.println("密码"+charSequence.toString());
        return charSequence+"aaa";
    }

    @Override
    public boolean matches(CharSequence charSequence, String s) {
        System.out.println("匹配"+charSequence.toString()+"\t"+s);
        return charSequence.equals(s);
    }
}
